#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
void adjust(int* p, size_t sz)
{
	int arr2[10] = { 0 };
	int arr3[10] = { 0 };
	int i = 0;
	int j = 0;
	int k = 0;
	for (i=0;i < sz;i++)
	{
		if ((*(p + i)) % 2 != 0)
		{
			arr2[j] = *(p + i);
			j++;
		}
		else
		{
			arr3[k] = *(p + i);
			k++;
		}
	}
	for ( i=0;i < j;i++)
	{
		*(p + i) = arr2[i];
	}
	for (i=0;i < k;i++)
	{
		*(p + j + i) = arr3[i];
	}
}
int main()
{
	int arr1[10] = {1,5,8,7,6,2,4,9,10,5};
	size_t sz = sizeof(arr1) / sizeof(arr1[0]);
	adjust(arr1, sz);
	int i = 0;
	for (i = 0;i < sz;i++)
	{
		printf("%d ", arr1[i]);
	}
	return 0;
}
